package com.norma.macaron.service.common.repository.user;

import com.norma.macaron.service.common.domain.user.TUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends JpaRepository<TUser,Long>, JpaSpecificationExecutor<TUser> {

    @Query("select user from TUser user where user.phone=:phone")
    TUser getByPhone(@Param("phone") String phone);
}
